#!/bin/bash
if [[ $(cat /etc/issue|cut -f 1 -d ' ') = 'Ubuntu' ]]; then
    if [ `which wget|wc -l` == 0 ];then sudo apt install wget;fi
    wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
    echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
    sudo apt update
    sudo apt install sublime-text
else
    echo 'This script is for Ubuntu only!'
fi
